body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1000px; /* 设置最大宽度 */
    margin: 0 auto; /* 居中显示 */
    padding: 20px; /* 内边距 */
}

.card {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 900px; /* 设置卡片的最大宽度 */
    margin: 0 auto; /* 居中显示 */
}
.card-header {
    border-bottom: none;
    background-color: #0d6efd;
    color: white;
}

.card-header h3 {
    font-weight: 700;
    margin: 0;
    padding: 15px 0;
}

.card-body {
    padding: 20px;
    text-align: center;
}

.upload-section {
    padding: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.form-label {
    font-weight: 600;
    margin-bottom: 10px;
}

.form-control {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.card-body img {
    max-height: 300px;
    object-fit: contain;
    border-radius: 5px;
}

.detection-item {
    padding: 8px;
    margin-bottom: 5px;
    background-color: #e9ecef;
    border-radius: 5px;
    font-size: 0.9rem;
}

.detection-item strong {
    color: #0d6efd;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.text-primary {
    color: #0d6efd !important;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.mt-2 {
    margin-top: 10px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 20px;
}

.text-center {
    text-align: center;
}

.d-grid {
    display: grid;
    place-items: center;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
/* 新增CSS样式 */
.upload-area {
    border: 2px dashed #0d6efd;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 1.5rem;
    max-width: 500px; /* 设置上传区域的最大宽度 */
    margin: 0 auto; /* 居中显示 */
}

.upload-area.dragover {
    border-color: #0b5ed7;
    background: rgba(13, 110, 253, 0.05);
}

.upload-instruction {
    pointer-events: none;
}

#imageUpload {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 10px;
    color: white;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    max-width: 400px; /* 设置统计卡片的最大宽度 */
    margin: 0 auto; /* 居中显示 */
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.wave-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%230d6efd" fill-opacity="0.1" d="M0,160L48,138.7C96,117,192,75,288,80C384,85,480,139,576,138.7C672,139,768,85,864,69.3C960,53,1056,75,1152,101.3C1248,128,1344,160,1392,176L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    z-index: -1;
}
/* 添加动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-section {
    animation: fadeIn 0.5s ease-out;
}

.btn-primary {
    transition: transform 0.2s ease;
}

.btn-primary:active {
    transform: scale(0.95);
}

.loading-dots::after {
    display: inline-block;
    animation: dots 1.5s infinite;
    content: '';
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}


.row {
    margin: 0 auto; /* 居中显示 */
    max-width: 1000px; /* 设置最大宽度 */
}

.col-md-6 {
    padding: 15px; /* 增加内边距 */
}